.class public Lcom/instagram/android/feed/comments/ui/l;
.super Lcom/instagram/ui/c/a;
.source "CommentThreadAdapter.java"


# instance fields
.field private final a:Lcom/instagram/android/widget/v;

.field private final b:Lcom/instagram/android/feed/comments/ui/c;

.field private c:Lcom/instagram/j/l;

.field private d:Z

.field private e:Z

.field private f:Ljava/util/Set;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Set",
            "<",
            "Lcom/instagram/j/b;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/instagram/android/widget/v;Lcom/instagram/android/feed/comments/ui/i;)V
    .locals 1
    .parameter
    .parameter
    .parameter

    .prologue
    .line 44
    invoke-direct {p0, p1}, Lcom/instagram/ui/c/a;-><init>(Landroid/content/Context;)V

    .line 37
    new-instance v0, Ljava/util/HashSet;

    invoke-direct {v0}, Ljava/util/HashSet;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/feed/comments/ui/l;->f:Ljava/util/Set;

    .line 45
    iput-object p2, p0, Lcom/instagram/android/feed/comments/ui/l;->a:Lcom/instagram/android/widget/v;

    .line 46
    new-instance v0, Lcom/instagram/android/feed/comments/ui/c;

    invoke-direct {v0, p3}, Lcom/instagram/android/feed/comments/ui/c;-><init>(Lcom/instagram/android/feed/comments/ui/i;)V

    iput-object v0, p0, Lcom/instagram/android/feed/comments/ui/l;->b:Lcom/instagram/android/feed/comments/ui/c;

    .line 47
    return-void
.end method

.method private b(Lcom/instagram/j/b;)Lcom/instagram/android/feed/comments/ui/k;
    .locals 1
    .parameter

    .prologue
    .line 91
    iget-boolean v0, p0, Lcom/instagram/android/feed/comments/ui/l;->e:Z

    if-nez v0, :cond_0

    .line 92
    sget-object v0, Lcom/instagram/android/feed/comments/ui/k;->a:Lcom/instagram/android/feed/comments/ui/k;

    .line 98
    :goto_0
    return-object v0

    .line 93
    :cond_0
    invoke-static {p1}, Lcom/instagram/android/feed/e/a;->a(Lcom/instagram/j/b;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 94
    iget-object v0, p0, Lcom/instagram/android/feed/comments/ui/l;->f:Ljava/util/Set;

    invoke-interface {v0, p1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    sget-object v0, Lcom/instagram/android/feed/comments/ui/k;->d:Lcom/instagram/android/feed/comments/ui/k;

    goto :goto_0

    :cond_1
    sget-object v0, Lcom/instagram/android/feed/comments/ui/k;->c:Lcom/instagram/android/feed/comments/ui/k;

    goto :goto_0

    .line 98
    :cond_2
    sget-object v0, Lcom/instagram/android/feed/comments/ui/k;->b:Lcom/instagram/android/feed/comments/ui/k;

    goto :goto_0
.end method


# virtual methods
.method protected a(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
    .locals 2
    .parameter
    .parameter
    .parameter

    .prologue
    .line 59
    invoke-virtual {p0, p2}, Lcom/instagram/android/feed/comments/ui/l;->getItemViewType(I)I

    move-result v0

    packed-switch v0, :pswitch_data_0

    .line 65
    new-instance v0, Ljava/lang/RuntimeException;

    const-string v1, "No item view type found"

    invoke-direct {v0, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 61
    :pswitch_0
    invoke-static {p1, p3}, Lcom/instagram/android/feed/comments/ui/c;->a(Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    .line 63
    :goto_0
    return-object v0

    :pswitch_1
    invoke-static {p1, p3}, Lcom/instagram/android/feed/a/b/j;->a(Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    goto :goto_0

    .line 59
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method protected a(Landroid/view/View;Landroid/content/Context;I)V
    .locals 4
    .parameter
    .parameter
    .parameter

    .prologue
    .line 71
    invoke-virtual {p0, p3}, Lcom/instagram/android/feed/comments/ui/l;->getItemViewType(I)I

    move-result v0

    packed-switch v0, :pswitch_data_0

    .line 88
    :goto_0
    return-void

    .line 73
    :pswitch_0
    invoke-virtual {p0, p3}, Lcom/instagram/android/feed/comments/ui/l;->getItem(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/j/b;

    .line 74
    iget-object v2, p0, Lcom/instagram/android/feed/comments/ui/l;->b:Lcom/instagram/android/feed/comments/ui/c;

    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/instagram/android/feed/comments/ui/j;

    invoke-direct {p0, v0}, Lcom/instagram/android/feed/comments/ui/l;->b(Lcom/instagram/j/b;)Lcom/instagram/android/feed/comments/ui/k;

    move-result-object v3

    invoke-virtual {v2, p2, v1, v0, v3}, Lcom/instagram/android/feed/comments/ui/c;->a(Landroid/content/Context;Lcom/instagram/android/feed/comments/ui/j;Lcom/instagram/j/b;Lcom/instagram/android/feed/comments/ui/k;)V

    goto :goto_0

    .line 82
    :pswitch_1
    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/feed/a/b/k;

    iget-object v1, p0, Lcom/instagram/android/feed/comments/ui/l;->a:Lcom/instagram/android/widget/v;

    invoke-static {v0, v1}, Lcom/instagram/android/feed/a/b/j;->a(Lcom/instagram/android/feed/a/b/k;Lcom/instagram/android/widget/v;)V

    goto :goto_0

    .line 71
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method public a(Lcom/instagram/j/b;)V
    .locals 1
    .parameter

    .prologue
    .line 165
    iget-object v0, p0, Lcom/instagram/android/feed/comments/ui/l;->f:Ljava/util/Set;

    invoke-interface {v0, p1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 166
    iget-object v0, p0, Lcom/instagram/android/feed/comments/ui/l;->f:Ljava/util/Set;

    invoke-interface {v0, p1}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z

    .line 171
    :goto_0
    invoke-virtual {p0}, Lcom/instagram/android/feed/comments/ui/l;->notifyDataSetChanged()V

    .line 172
    return-void

    .line 168
    :cond_0
    iget-object v0, p0, Lcom/instagram/android/feed/comments/ui/l;->f:Ljava/util/Set;

    invoke-interface {v0, p1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    goto :goto_0
.end method

.method public a(Lcom/instagram/j/l;)V
    .locals 2
    .parameter

    .prologue
    .line 103
    iput-object p1, p0, Lcom/instagram/android/feed/comments/ui/l;->c:Lcom/instagram/j/l;

    .line 104
    invoke-virtual {p1}, Lcom/instagram/j/l;->k()Z

    move-result v0

    iput-boolean v0, p0, Lcom/instagram/android/feed/comments/ui/l;->d:Z

    .line 105
    iget-object v0, p0, Lcom/instagram/android/feed/comments/ui/l;->g:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 107
    invoke-virtual {p1}, Lcom/instagram/j/l;->D()Lcom/instagram/j/f;

    move-result-object v0

    .line 108
    if-eqz v0, :cond_0

    .line 109
    iget-object v1, p0, Lcom/instagram/android/feed/comments/ui/l;->g:Ljava/util/List;

    invoke-virtual {v0}, Lcom/instagram/j/f;->c()Ljava/util/List;

    move-result-object v0

    invoke-interface {v1, v0}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 111
    :cond_0
    invoke-virtual {p0}, Lcom/instagram/android/feed/comments/ui/l;->notifyDataSetChanged()V

    .line 112
    return-void
.end method

.method public a()Z
    .locals 1

    .prologue
    .line 155
    iget-boolean v0, p0, Lcom/instagram/android/feed/comments/ui/l;->e:Z

    return v0
.end method

.method public b()V
    .locals 1

    .prologue
    .line 159
    iget-boolean v0, p0, Lcom/instagram/android/feed/comments/ui/l;->e:Z

    if-nez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    iput-boolean v0, p0, Lcom/instagram/android/feed/comments/ui/l;->e:Z

    .line 160
    iget-object v0, p0, Lcom/instagram/android/feed/comments/ui/l;->f:Ljava/util/Set;

    invoke-interface {v0}, Ljava/util/Set;->clear()V

    .line 161
    invoke-virtual {p0}, Lcom/instagram/android/feed/comments/ui/l;->notifyDataSetChanged()V

    .line 162
    return-void

    .line 159
    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public getCount()I
    .locals 1

    .prologue
    .line 132
    iget-boolean v0, p0, Lcom/instagram/android/feed/comments/ui/l;->d:Z

    if-eqz v0, :cond_0

    .line 133
    iget-object v0, p0, Lcom/instagram/android/feed/comments/ui/l;->g:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    add-int/lit8 v0, v0, 0x1

    .line 135
    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lcom/instagram/android/feed/comments/ui/l;->g:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    goto :goto_0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .parameter "position"

    .prologue
    .line 51
    iget-boolean v0, p0, Lcom/instagram/android/feed/comments/ui/l;->d:Z

    if-eqz v0, :cond_0

    .line 52
    add-int/lit8 v0, p1, -0x1

    invoke-super {p0, v0}, Lcom/instagram/ui/c/a;->getItem(I)Ljava/lang/Object;

    move-result-object v0

    .line 54
    :goto_0
    return-object v0

    :cond_0
    invoke-super {p0, p1}, Lcom/instagram/ui/c/a;->getItem(I)Ljava/lang/Object;

    move-result-object v0

    goto :goto_0
.end method

.method public getItemViewType(I)I
    .locals 1
    .parameter "position"

    .prologue
    .line 142
    if-nez p1, :cond_0

    iget-boolean v0, p0, Lcom/instagram/android/feed/comments/ui/l;->d:Z

    if-eqz v0, :cond_0

    .line 143
    const/4 v0, 0x1

    .line 145
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public getViewTypeCount()I
    .locals 1

    .prologue
    .line 151
    const/4 v0, 0x2

    return v0
.end method

.method public notifyDataSetChanged()V
    .locals 1

    .prologue
    .line 116
    iget-object v0, p0, Lcom/instagram/android/feed/comments/ui/l;->c:Lcom/instagram/j/l;

    if-eqz v0, :cond_0

    .line 117
    iget-object v0, p0, Lcom/instagram/android/feed/comments/ui/l;->c:Lcom/instagram/j/l;

    invoke-virtual {v0}, Lcom/instagram/j/l;->a()V

    .line 119
    :cond_0
    invoke-super {p0}, Lcom/instagram/ui/c/a;->notifyDataSetChanged()V

    .line 120
    return-void
.end method

.method public notifyDataSetInvalidated()V
    .locals 1

    .prologue
    .line 124
    iget-object v0, p0, Lcom/instagram/android/feed/comments/ui/l;->c:Lcom/instagram/j/l;

    if-eqz v0, :cond_0

    .line 125
    iget-object v0, p0, Lcom/instagram/android/feed/comments/ui/l;->c:Lcom/instagram/j/l;

    invoke-virtual {v0}, Lcom/instagram/j/l;->a()V

    .line 127
    :cond_0
    invoke-super {p0}, Lcom/instagram/ui/c/a;->notifyDataSetInvalidated()V

    .line 128
    return-void
.end method
